home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1989 September / 1989-09.d64 / ez bar charter (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  2KB  |  84 lines

  1. 10 rem copyright 1989 compute! publications, inc. - all rights reserved
  2. 15 poke53281,6:poke53280,6:poke646,1
  3. 20 print"[147]"tab(11)"   graph maker   [146]"
  4. 30 printtab(12)"copyright 1989":printtab(7)"compute! publications, inc."
  5. 40 printtab(10)"all rights reserved"
  6. 50 forx=0to2000:next
  7. 60 print"[147]"tab(9)" y-axis [146] graph range"
  8. 70 printtab(14)" 1 [146] 0-40":printtab(14)" 2 [146] 0-100"
  9. 80 printtab(14)" 3 [146] 0-200"
  10. 90 print""tab(12)"select (1-3) "
  11. 100 geti$:ifi$<"1"or i$>"3"then100
  12. 110 i=val(i$):if i=1 thenmax=40
  13. 120 if i=2 thenmax=100
  14. 130 if i=3 thenmax=200
  15. 140 print" how many items will be graphed? (1-8)"
  16. 150 getl$:if l$<"1"orl$>"8"then150
  17. 160 l=val(l$):print"[147] enter a 3 character label and a value"
  18. 170 print" for each item to be graphed. the value"
  19. 180 print" entered must fall between 0 -";max;""
  20. 190 forx=1 to l
  21. 200 print" label";x;:inputm$(x)
  22. 210 iflen(m$(x))<>3thenprint"[145][145][145]":goto200
  23. 220 printtab(17)"[145]value for ";m$(x);:inputh(x)
  24. 230 ifh(x)<0orh(x)>maxthen220
  25. 240 next
  26. 250 print"[147] enter a title (25 characters or less)   for your graph."
  27. 260 input" title: ";gt$
  28. 270 iflen(gt$)>25orlen(gt$)<1then250
  29. 280 print"[147]  graphing range [146]  0 -";max
  30. 290 print"  graph labels [146]      value [146]"
  31. 300 forx=1tol
  32. 310 printtab(5)m$(x);tab(21)h(x):nextx
  33. 320 print"  graph title [146] ";gt$
  34. 330 print"       everything correct? y/n[146]"
  35. 340 getk$:ifk$=""then340
  36. 350 ifk$="n"then60
  37. 360 print"[147]          ";gt$:forx=0to19:print"     [171]":nextx
  38. 370 print"     [183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183]"
  39. 380 printtab(6);
  40. 390 forx=1tol
  41. 400 printh(x);
  42. 410 next:print
  43. 420 print"       ";:fortt=1tol:printm$(tt);" ";:next:print""
  44. 430 print"  ";:ifmax>40thenprint"[157]";
  45. 440 printmax
  46. 450 ifi=1then480
  47. 460 ifi=2then500
  48. 470 ifi=3then520
  49. 480 forx=36to10step-4:print"  " x:next
  50. 490 forx=8to0step-4:print"   ";x:nextx:goto540
  51. 500 forx=90to10step-10:print"  " x:nextx:print"    0"
  52. 510 goto540
  53. 520 forx=180to100step-20:print"  [157]"x:nextx
  54. 530 forx=80to0step-20:print"  "x:nextx:print"[145]    0":goto540
  55. 540 d=2:x=0:r=37:forx=1tol:print"":r=r+4:forsp=1to3:printspc(255):nextsp
  56. 550 printspc(r)
  57. 560 d=d+4:print"[145] [166][166][161]"
  58. 570 ifi<3andh(x)=0then700
  59. 580 ifi=3andh(x)<10then700
  60. 590 ifi=1andh(x)<4then680
  61. 600 ifi=2andh(x)<=5 then680
  62. 610 ifi=3andh(x)<=20then680
  63. 620 ifi=1theny=int(h(x)/2)-1:goto670
  64. 630 ifi=3theny=int(h(x)/10)-1:goto670
  65. 640 ifi=2thenaa=h(x)/10:bb=int(h(x)/10):cc=aa-bb:ifcc=0theny=bb*2-1:goto670
  66. 650 ifcc<=.5theny=bb*2
  67. 660 y=bb*2+1
  68. 670 forb=1toy-1:printtab(d)"[145][145] [166][166][161] ":nextb
  69. 680 printtab(d)"[145][145]  [162][187]":nextx
  70. 690 ifx=l+1then710
  71. 700 nextx
  72. 710 d=2
  73. 720 d=d+4:ifh(x)=0then740
  74. 730 printtab(d):printh(x):next
  75. 740 getk$:ifk$=""then740
  76. 750 ifk$="a"thenrun
  77. 760 ifk$="p"then790
  78. 770 print"        'p' to print 'a' for another "
  79. 780 goto740
  80. 790 print"                                     "
  81. 800 open6,4,6:print#6,chr$(15):close6
  82. 810 open3,3,3:open4,4:print"";:forc=0to1022:get#3,a$:print#4,a$;:next
  83. 820 print"[147]":print#4:close4:close3:goto360
  84.